import sys

from PySide6.QtWidgets import QApplication, QMainWindow

from exer_lib.splitter_demo.mainwindow_ui import Ui_MainWindow


class MainWindow(QMainWindow):

    def __init__(self):
        super().__init__()
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        # 设置QSplitter分割的大小比例
        self.ui.main_splitter.setSizes([3, 1])
        self.ui.up_part_splitter.setSizes([1, 3])


if __name__ == "__main__":
    app = QApplication(sys.argv)

    window = MainWindow()
    window.setWindowTitle("QSplitter demo")
    window.show()

    sys.exit(app.exec())
